import request from '@/utils/request'

// 查询宿舍楼列表
export function listBuilding(data) {
  return request({
    url: '/dormitory/dms-dormitory-building/list?pageNum=' + data.pageNum + '&pageSize=' + data.pageSize,
    method: 'POST',
    data
  })
}

// 查询宿舍楼详细
export function getBuilding(id) {
  return request({
    url: `/dormitory/dms-dormitory-building/${id}`,
    method: 'get'
  })
}

// 新增宿舍楼
export function addBuilding(data) {
  return request({
    url: '/dormitory/dms-dormitory-building/add',
    method: 'post',
    data: data
  })
}

// 修改宿舍楼
export function updateBuilding(data) {
  return request({
    url: '/dormitory/dms-dormitory-building/update',
    method: 'post',
    data: data
  })
}

// 删除宿舍楼
export function delBuilding(id) {
  return request({
    url: "/dormitory/dms-dormitory-building/delete",
    method: 'post',
    data: id
  })
}
